<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var rets = [2,4,5,6,7,9,10,15];
			function arrayMin(arrs){
    var min = arrs[0];
    for(var i = 1, a = arrs.length; i < a; i+=1) {
        if(arrs[i] < min) {
            min = arrs[i];
        }
    }
    return min;
}
			function arrayMax(arrs) {
    var max = arrs[0];
    for(var i = 1,a = arrs.length; i < a; i++) {
        if(arrs[i] > max) {
            max = arrs[i];
        }
    }
    return max;
}
console.log(arrayMin(rets));
console.log(arrayMax(rets));
		</script>
	</body>
</html>
